﻿using System;
using System.Windows.Controls;

namespace Microsoft.Popfly.GameCreator.GameEngine
{
    public partial class MandatorySplash : Canvas
    {
        public MandatorySplash(double sceneWidth, double sceneHeight, double viewportWidth, double viewportHeight)
        {
            InitializeComponent();

            double scale = Math.Min(viewportWidth, viewportHeight) / 80;
            double size = 30 * scale;

            ScaleToSet.ScaleX = scale;
            ScaleToSet.ScaleY = scale;

            Canvas.SetLeft(this, sceneWidth - size * 1.03);
            Canvas.SetTop(this, sceneHeight - size * 1.03);
        }
    }
}
